package src.main.CreationalPatterns.Factory;

public class RoleFactory {
    public static Role createRole(String type, String name) {
        return switch (type) {
            case "warrior" -> new Warrior(name);
            case "mage" -> new Mage(name);
            default -> null;
        };
    }
}
